< previous page page_518 next page >

Page 518
You can add Watch expressions either at designtime or while the application is in Break mode. The Add Watch dialog box prompts you for the information needed to set the Watch expression (see Figure 18.12).
12181-0518a.gif
Figure 18.12.
Using the Add Watch dialog box to help the
debugging process.
Besides entering the expression, you must set the context for the watch item using the drop-down lists in the Context Option group. This defines in which procedures Visual Basic should monitor the expression. It can watch the expression in a single procedure, a form, a module, or the entire application. Besides the context of the expression, you can also specify the type of watch you are setting. The watch type can just display the contents of the expression as its value changes, break when its value is True or break every time its value changes. If you want to modify the Watch expression, you would select Debug|Edit Watch from the menu. If you want to delete an expression, select the one you want to delete in the Watches window, and then press Delete.
In addition, when you are in Break mode, you can check the value of a property, variable, or expression quickly using the Quick Watch dialog box shown in Figure 18.13.
12181-0518b.gif
Figure 18.13.
The Quick Watch dialog box showing the value
of an expression.
If you need to continue watching this expression, you can add it to the watch window by clicking Add. This expression would then appear in the Watches window. The fastest way of accessing the Quick Watch function is by selecting the variable or expression and pressing the Shift+F9.

 
< previous page page_518 next page >

If you like this book, buy it!